#!/bin/bash

# build_number.sh
# xD-OS
#
# Created by James Johns on 09/08/2009.
# Copyright 2009 xD-Dunce. All rights reserved.

echo Fetching and updating build number ...

read COUNT < counter

echo $((COUNT+1)) > counter

sed '$d' < source/kernel/build_number.c > source/kernel/temp.h; mv source/kernel/temp.h source/kernel/build_number.c
echo "dWord BuildNumber = " $((COUNT+1)) ";" >>source/kernel/build_number.c
